Repository navigation
NAT-545: Inspect Android media metadata (1 of 2) - #167
Merged
eugene-mux merged 10 commits intoOct 16, 2026
Merged
eugene-mux merged 10 commits into
eugene-mux merged 10 commits into
Conversation
eugene-mux
marked this pull request as ready for review
October 2, 2026 22:58
daytime-em
approved these changes
Oct 14, 2026
daytime-em
requested changes
Oct 16, 2026
daytime-em
left a comment
Collaborator
There was a problem hiding this comment.
You should be able to greatly simplify this code by relying on MediaFormat's prop-getters. Parsing csd buffers is cool, but those are also generated by MediaExtractor from the same container boxes that supply data for the higher-level property-getters (getInt(KEY_*), etc)
eugene-mux
force-pushed
the
em/nat-545-metadata-inspection
branch
from
October 16, 2026 18:08
4f2ab02 to
a109f27
Compare
Base automatically changed from
em/nat-544-standard-input-policy
to
feature/nat-534-hevc-standard-ingest
October 16, 2026 18:09
eugene-mux
force-pushed
the
em/nat-545-metadata-inspection
branch
from
October 16, 2026 18:09
a109f27 to
de0c618
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit de0c618. Configure here.
Author
|
@daytime-em thanks for the review, I've updated the PR with your suggestions. |
eugene-mux
merged commit Oct 16, 2026
25a3cf2
into
feature/nat-534-hevc-standard-ingest
2 checks passed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Inspect local video metadata using MediaExtractor/MediaFormat. Available platform properties are authoritative; unavailable facts remain unknown unless the existing bounded Media3 helper can fill the gap.
Changes
Validation
Fixture media, validation tooling and evidence remain outside product Git.
Note
Medium Risk
Introduces parsing of untrusted container/codec metadata that feeds upload standardization decisions; mitigated by bounded parsing and unknown fallbacks, but incorrect facts could affect accept/fallback policy.
Overview
Adds file-level metadata inspection for the upload standardization pipeline using
MediaExtractor/MediaFormat, without reading media samples. Track-level reported duration, frame rate, and bitrate are kept separate fromMediaFacts; timeline/sample-derived fields stay unknown until later work.Platform metadata is authoritative for codec, profile, dimensions, crop, rotation, color/HDR, and AAC layout. A new
CodecMetadataReaderonly fills gaps (profile, pixel format, color transfer) from bounded AVC/HEVCcsd-*initialization data when platform keys are missing—never overriding platform values. Rotation is normalized to the shared Swift transform convention (documented onMediaFacts), with raw Android rotation retained for observation.Includes defensive limits (max tracks, max CSD size, bounded HEVC SPS pre-checks) and conservative handling for ambiguous Dolby multi-view tracks. Robolectric tests cover platform vs header fallback, API-level behavior, rotation/crop, and planner integration for Dolby fallback.
Reviewed by Cursor Bugbot for commit f541f79. Bugbot is set up for automated code reviews on this repo. Configure here.